<template>
	<view>
		<map :latitude="latitude" :longitude="longitude" class="map" scale="18"></map>
	</view>
</template>

<script>
	export default {
		onLoad() {
			uni.getLocation({
				type: 'wgs84',
				success: (res) => {
					console.log('当前位置的经度：' + res.longitude);
					console.log('当前位置的纬度：' + res.latitude);
					console.log(res)
					this.latitude = res.latitude;
					this.longitude = res.longitude
				}
			});
		},
		data() {
			return {
				latitude: 28.68194,
				longitude: 115.96191
			}
		},
		methods: {}
	}
</script>

<style>
	.map {
		width: 750rpx;
		height: 750rpx;
	}
</style>
